package com.sharemarking.wa.platform.controller;

import com.sharemarking.wa.common.ResponseParams;
import com.sharemarking.wa.platform.service.CarManagementService;
import com.sharemarking.wa.platform.service.CmsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author dxy
 */
@RestController
@RequestMapping(value = "carManagement")
public class CarManagementController {
    @Autowired
    CarManagementService carManagementService;

    /**
     * 获取车辆列表
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "getList")
    public ResponseParams<?> getList() throws Exception {
        return carManagementService.getList();
    }

    /**
     * 新增或编辑车辆
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "addOrEdit")
    public ResponseParams<?> addOrEdit() throws Exception {
        return carManagementService.addOrEdit();
    }


    /**
     * 删除车辆
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "delete")
    public ResponseParams<?> delete() throws Exception {
        return carManagementService.delete();
    }



}
